import java.awt.List;
import java.util.ArrayList;
import java.util.Scanner;
public class Input {
public static void main(String[] args)
{
    String str="";
    int i;
    Scanner r=new Scanner(System.in);
    System.out.print("请输入字符串，并以exit结束.\n");
    ArrayList<String> str_list=new ArrayList<String>();
    while(!str.equals("exit"))
    {
        str=r.nextLine();  //输入字符串
        str_list.add(str);
    }
    for(i=0;i<str_list.size();i++)
    {
        System.out.println(str_list.get(i));
    }
    r.close();
    }
}
